package cn.tedu.exec;

/**该类用于opp（面向对象）综合练习案例2
 * @author ：Dsi
 * @date ：2021/11/5 17:01
 */
public class TestDog {
    public static void main(String[] args) {
       Dog d=new Dog();
       d.eat(100);
       d.sleep(10);
       d.play("小明");
    }
}
class Dog{
    private String name;
    private int age;
    private String kind;
    private String host;
    private double price;

    public void run(){
        System.out.println("小狗跑的老快了");
    }
    public void eat(int n){
        System.out.println("小狗今晚要吃"+n+"根骨头");
    }
    public void sleep(double num){
        System.out.println("今天小狗睡了"+num+"小时~");
    }
    public String play(String host){
        System.out.println("小狗与主人"+host+"玩的很开心");
        bark();
        return host;
    }
    private void bark(){
        System.out.println("小狗喜欢汪汪叫");
    }
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getKind() {
        return kind;
    }

    public void setKind(String kind) {
        this.kind = kind;
    }

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }
}